package com.desksoft.ecommerce.util.html.view.print.dynamictemplate;

import org.dom4j.Element;

import com.desksoft.ecommerce.util.html.element.PageElement;

/**
 * 动态模版配置元素
 * @author Administrator
 *
 */
public class DynamicTemplateElement extends PageElement {

	/**
	 * 从属表ID
	 */
	protected String tableId;
	
	/**
	 * 参数映射集合
	 */
	protected ParamMapElement paramMap;
	
	/**
	 * 字段映射集合
	 */
	protected ParamMapElement fieldMap;
	
	public DynamicTemplateElement(Element elmtDynamic) {
		
		this.tableId = elmtDynamic.attributeValue("tableId");
		
		Element elmtParamMap = elmtDynamic.element("paramMap");
		paramMap = new ParamMapElement(elmtParamMap);
		
		Element elmtfieldMap = elmtDynamic.element("fieldMap");
		fieldMap = new ParamMapElement(elmtfieldMap);
	}

	public String getTableId() {
		return tableId;
	}

	public void setTableId(String tableId) {
		this.tableId = tableId;
	}

	public ParamMapElement getParamMap() {
		return paramMap;
	}

	public void setParamMap(ParamMapElement paramMap) {
		this.paramMap = paramMap;
	}

	public ParamMapElement getFieldMap() {
		return fieldMap;
	}

	public void setFieldMap(ParamMapElement fieldMap) {
		this.fieldMap = fieldMap;
	}
}
